#pragma once

#include "Command.h"
#include "ClientComm.h"
#include <iostream>

using namespace std;

class Client_IO
{
private:
	Command		command;				//The command object that will be passed from the client to the server to send to gamestate
										//where gamestate will do any necessary calculations and than send back to I/O to display messages
	ClientComm	comm;					//Comunication object used to send commands which will be packed and "sent down the line" to the gamestate to be updated
	int			value;					//Variable that represents how many acres the user wishes to buy or sell? (enter a negative amount to sell acres for bushels),
										//How many bushels the user wishes to use to feed their people?
										//How many acres the user wishes to plant with seed?
	char		ip[64];					//Char* which represents the ip adress the user is connecting to
	bool		endGame;				//End game variable that will determine if the game is running which will determine if the game is recieving input or output currently

	enum GAME_STATE						//Enum that will determine which state of the game the user currently is in
	{
		ACRES,							//User will buy or sell a certain amount of acres
		FEED,							//User will feed his people a certain amount of bushels
		PLANT							//User will plant a certain amount of bushels given there is enough people, acres, and bushels
	};

	GAME_STATE	gameState;				//Enum that will determine which input or output will be sent or recieved and than displayed

public:
	//Constructor
	Client_IO();

	//////////////////////////////////////////////////////////////////////////
	// Name:		Run
	// Parameters:	void
	// Return:		void
	// Description: This function is run once in the main.
	//////////////////////////////////////////////////////////////////////////
	void Run();
};